package com.cn.wanxi.front;

import com.cn.wanxi.model.CompanyModel;
import com.cn.wanxi.model.NavModel;
import com.cn.wanxi.service.CompanyService;
import com.cn.wanxi.service.NavService;
import com.cn.wanxi.service.impl.CompanyServiceImpl;
import com.cn.wanxi.service.impl.NavServiceImpl;

import java.util.*;

public class CommonServlet {
    public static Map getData() {
        CompanyService companyService = new CompanyServiceImpl();
        CompanyModel companyModel = companyService.getFrontCompanyModel();
//        导航
        NavService navService = new NavServiceImpl();
        List<NavModel> navModelList = navService.getNavModelList();
        Map map = new HashMap();
        map.put("companyModel", companyModel);
        map.put("navModelList", navModelList);
        return map;
    }
    public static Set getsetData() {
        CompanyService companyService = new CompanyServiceImpl();
        CompanyModel companyModel = companyService.getFrontCompanyModel();
//        导航
        NavService navService = new NavServiceImpl();
        List<NavModel> navModelList = navService.getNavModelList();
        Set set = new HashSet();
        set.add(companyModel);
        set.add( navModelList);
        return set;
    }
}
